<template>
  <div>
    <input id="companyName" type="text" placeholder="请输入企业名" v-model="companySearchName"/>
    <button @click="search">查一下</button>
    <div>{{companyList}}</div>
  </div>
</template>

<script>
  import request from '../../network/request'
  
  export default {
    name: "Search",
    data() {
      return {
        companySearchName: '',
        companyList: ''
      }
    },
    methods: {
      search() {
        request({
          url: '/forward.do',
          method: 'post',
          params: {
            url: 'api.cvsource.com.cn/open/huafa/v1/company/list',
            keyword: this.companySearchName
          }
        }).then(res => {
          this.companyList = res.data.data;
        })
      }
    }
  }
</script>

<style scoped>

</style>